package com.wanxi.treeset;

import java.util.Set;
import java.util.TreeSet;

public class StringLengthSort {
    public static void main(String[] args) {
        Set<Teacher> set = new TreeSet<>();
        set.add(new Teacher("zhangsan", 11));
        set.add(new Teacher("zaaa", 13));
        set.add(new Teacher("zhanfsadgsan", 4));
        set.add(new Teacher("zhafdsangsan", 63));
        set.add(new Teacher("zha76an", 7));
        for (Teacher t : set
        ) {

            System.out.println(t);
        }

    }
}
